#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:do_file1_open.py
# author:Jackiex
# datetime:2023/4/20 15:21
# software: PyCharm

"""
  文件操作
"""

import os

print("当前工作的路径：",os.getcwd())

# f = open("test.txt","r")
#
# print(type(f))


# f = open("face.jpg","rb")
# print(type(f))


# 添加内容到文件
f = open("test.txt","w",encoding='gbk')
f.write("Python语言是一个非常好的编程语言；\n")

# 关闭
f.close()